using System;
using System.Collections;
using System.Collections.Generic;

namespace LightCAD.Three
{
        public class AmbientLightProbe : LightProbe
        {
            #region Properties

            #endregion

            #region constructor
            public AmbientLightProbe(object color=null, double intensity = 1)
                :base(null,intensity)
            {
                var color1 = new Color();
                if(color!=null) color1.set(color);
                // without extra factor of PI in the shader, would be 2 / JMath.sqrt( JMath.PI );
                this.sh.coefficients[0].set(color1.r, color1.g, color1.b).multiplyScalar(2 * JMath.sqrt(JMath.PI));
            }
            #endregion

        }
}
